# Makefile : Makefile
# CopyRight (c) 2008 fake, Inc. All Rights Reserved.
# fake@fake.cn
# 2009-01

TARGET = main

SRCS = $(wildcard *.cpp)
OBJS = $(foreach src, $(SRCS), $(basename $(src)).o )

CFLAGS = -Wall -g 
LDFLAGS += -lm

#####################################
.PHONY : all clean

all : $(TARGET)

$(TARGET) : $(OBJS)
	$(CXX) -o $@ $^ $(LDFLAGS)

clean :
	@rm -f $(TARGET) *.o

##################################
.SUFFIXES : .cpp

.cpp.o :
	$(CXX) $(CFLAGS) -c -o $@ $<
